package com.avilyne.rest.model;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlRootElement;

// Book Class
@SuppressWarnings("serial")
@XmlRootElement
public class Book extends ObjectStore{
	public static final String TAG = "book";

	public int id = -1;
	public int storeId = -1;
	public String title = "";
	public String author = "";
	public String image = "";
	public ArrayList<Page> pages = new ArrayList<Page>();

	public Book() {

	}

	public static Book createDataSample() {
		return createDataSample(1);
	}

	public static Book createDataSample(int index) {
		Book book = new Book();
		book.id = index;
		book.title = "sách " + index;
		book.author = "tác gia: " + index;
		book.storeId = index;
		book.pages = new ArrayList<Page>();
		book.image = "";
		for(int i=0;i<3;i++){
			Page page = Page.createDataSample(i);
			book.pages.add(page);
		}
		return book;
	}

	
}
